<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="editcell">
	<table class="adminlist">
	<thead>
	   	
	   <tr>
			<th width="5%">
				<?php echo JText::_( 'ID' ); ?>
			</th>
			<th width="5%">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->items ); ?>);" />
			</th>			
			<th width="20%">
				<?php echo JText::_( 'Title' ); ?>
			</th>
		    <th width="20%">
				<?php echo JText::_( 'Webinar' ); ?>
			</th>
			<th width="10%">
				<?php echo JText::_( 'Date' ); ?>
			</th>
			<th width="10%">
				<?php echo JText::_( 'Time' ); ?>
			</th>
			<th width="40%">
				<?php echo JText::_( 'Description' ); ?>
			</th>
			
		    <th width="40%">
				<?php echo JText::_( 'User' ); ?>
			</th> 
			
		</tr>
	</thead>
	<?php
	$k = 0;
	
	for ($i=0, $n=count( $this->items ); $i < $n; $i++)	{
		$row = &$this->items[$i];
		//print_r($row);
		//$db=JFactory::getDbo();
		//$query="select * from #__users where id_webinar";
		$checked 	= JHTML::_('grid.id',   $i, $row->id );
		$link 		= JRoute::_( 'index.php?option=com_webminar&controller=nam&task=edit&cid[]='. $row->id_webinar );
		?>
		<tr class="<?php echo "row$k"; ?>">
			<td>
				<?php echo $row->id_webinar; ?>
			</td>
			<td>
				<?php echo $checked; ?>
			</td>
			<td>
				<a href="<?php echo $link; ?>"><?php echo $row->title; ?></a>
			</td>
		   <td>
				<?php echo $row->webminars; ?>
			</td>
			<td>
				<?php echo $row->date; ?>
			</td><td>
				<?php echo $row->time; ?>
			</td><td>
				<?php echo $row->description; ?>
			</td>
			<td>
				<a href="index.php?option=com_users&task=user.edit&id=<?php echo $row->id;?>" target="_blank"><?php echo $row->name; ?></a>
			</td>
		    
	   </tr>
		<?php
		$k = 1 - $k;
	}
	?>
	</table>
</div>

<input type="hidden" name="option" value="com_webminar" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="nam" />
</form>
